package com.zj.jdbc1Tools;

public enum SingletonEnum {

    //创建一个枚举对象，该对象天生为单例
    INSTANCE;
    private UserDaoImpl userDao;
    //私有化枚举的构造函数
    private SingletonEnum(){
        userDao=new UserDaoImpl();
    }
    public UserDaoImpl getInstnce(){
        return userDao;
    }
}
